<%@ include file="/taglibs.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>
	<title>北京邮电大学学生党员在线学习中心</title>
	
	<link type="text/css" rel="stylesheet" href="${ctx}/css/jquery-ui-1.8.16.custom.css" />
	
	<script type="text/javascript" src="${ctx}/scripts/jquery-1.6.2.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jquery.ui.core.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
		$(function() {
			$('#joinPartyDate').datepicker({ changeYear: true,changeMonth:true,yearRange: 'c-60:c+20'}); 
			
		});
	</script>
	
	
	<script type="text/javascript">
	String.prototype.trim = function()
	{
	  return this.replace(/(^\s*)|(\s*$)/g, "");
	}
	
	function check() {
		              
		 //var sfzNO = document.form1.sfzNO.value.toString();//身份证号
		   var stuGender = document.form1.stuGender.value.toString();//性别
		   var stuNationality = document.form1.stuNationality.value.toString();//民族
		 //var firstPa = document.form1.firstPa.value.toString();//党委
		 //var secondPa = document.form1.secondPa.value.toString();//党支部
		   var telephone = document.form1.telephone.value.toString();//电话号码
		   var email = document.form1.email.value.toString();//邮箱
 	   	 if(stuGender == 0) {
			       alert('请选择性别！');
			       document.form1.stuGender.focus();
			       return false;
			        
		   }else if(stuNationality==0) {
		       alert('请选择民族!');
		       document.form1.stuNationality.focus();
		       return false;
		   }  
	
		}
	</script>
</head>
<div id="nav_bar">
    <img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt=""/>
    <div id="welcome_label">欢迎您，&nbsp;<s:property value="#session.session_user.studentName" />!</div>
    <img id="nav_bar_seperator" src="../../../styles/nav_bar_seperator.png" alt=""/>
    <div id="nav_location">
        <img id="nav_bar_point" src="../../../styles/nav_bar_point.png" alt="" />
        <div id="nav_cur_location">当前位置：&nbsp;<a href="${ctx}/UserAction_indexAction">首页</a>&nbsp;&nbsp;>&nbsp;&nbsp;<a href="${ctx}/UserAction_personCenter">个人中心</a>&nbsp;&nbsp;>&nbsp;&nbsp;<span style="color:black;">查改个人信息</span></div>
    </div>
    <img style="float:right; width:5px;" src="../../../styles/nav_bar_right.png" alt=""/>
    <a id="nav_logout" href="${ctx}/logoutAction">[安全退出]</a>
</div>
<div style="clear:both; height:5px;">&nbsp;</div>
<div style="min-height:450px;">
	<!-- left -->
	<div id="side_menu">
	    <div id="side_menu_title">
	        <img src="../../../styles/side_menu_title_img.png" alt="" />
	        <span>个人中心</span>
	    </div>
	    <div id="side_menu_title_bottom">&nbsp;</div>
	    <div class="side_sub_menu_focus">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/UserAction_personInfo">查改个人信息</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/UserAction_modifyPassword">修改个人密码</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/UserAction_viewRecord">查看学习记录</a>
	    </div>
	</div>
	
	<div id="main_content">
	    <div id="main_content_title">
	        <img src="../../../styles/content_title_img.png" alt="" />
	        <span>查改个人信息</span>
	    </div>
	    <div class="main_content_title_bottom">&nbsp;</div>
	    <s:form action="UserAction_save_personInfo" name="form1"  method="post" onsubmit="return check();">
	    <table id="table" class="page_table" cellspacing="0" cellpadding="0" >
		    <tr>
				<td class="leftTD">姓名:</td>
				<td class="rightTD"><s:property value="#request.student.studentName"/>
					<input id="stuName" name="stuName" type="hidden" value='<s:property value="#request.student.studentName"/>'  readonly="readonly"/>
				</td>
			</tr>
			<tr>
				<td class="leftTD2">学号:</td>
				<td><s:property value="#request.student.studentNo"/>
				<input id="stuNO" name="stuNO" type="hidden"  value='<s:property value="#request.student.studentNo"/>' readonly="readonly"/>
				</td>
			</tr>
			<tr>
				<td class="leftTD">身份证号:</td>
				<td class="rightTD2">
					<s:property value="#request.student.studentIdentity"/>
					<input id="sfzNO" name="sfzNO" type="hidden" value='<s:property value="#request.student.studentIdentity"/>'/>
				</td>
			</tr>
			<tr>
				<td class="leftTD2">性别:</td>
				<td class="rightTD">
					<select id="stuGender" name="stuGender" style="width:40%;">
						<s:if test="#request.student.studentGender == 1">
							 <option value="0" >请选择</option>
							 <option value="1" selected="selected">男</option>
							 <option value="2" >女</option>
						</s:if>
						<s:else>
							<option value="0" >请选择</option>
							<option value="1" >男</option>
							<option value="2" selected="selected">女</option>
						</s:else>
					</select><font color="red">*</font>	
				</td>
			</tr>
			<tr>
				<td class="leftTD">民族:</td>
			    <td>
			       <select id="stuNationality" name="stuNationality" style="width:40%;">
						<s:iterator value="nationality.collection">
						   <s:if test="id == #request.student.studentNationality">
						   <option value="<s:property value='id' />" selected="selected"><s:property value='name' /></option>
						   </s:if>
							<s:else>
							  <option value="<s:property value='id' />" ><s:property value='name'/></option>
							</s:else>
						</s:iterator>
					</select>
				</td>
			</tr>
			<tr>
				<td class="leftTD2">所属党组织:</td>
				<td class="rightTD2" >
					<s:property value="#request.branchName"/>
				</td>
			</tr>
			
			<tr>
				<td class="leftTD">联系电话:</td>
				<td class="rightTD"><input id="telephone" name="telephone" type="text" value='<s:property value="#request.student.studentTelephone"/>'/></td>
			</tr>
			<tr>
				<td class="leftTD2">电子邮箱:</td>
				<td class="rightTD"><input id="email" name="email" type="text" value='<s:property value="#request.student.studentEmail"/>'/></td>
			</tr>
	    </table>
	    <div style="clear:both; height:5px;"></div>
		<div style="text-align:center; width:90%;">
			<input type="submit"  name="submit" id="submit" class="input-button" value="保存" />
			<input id="history" name="history" type="button" class="input-button" value="返回" onclick="window.location.href='javascript:history.go(-1);'"/>
		</div>
	    </s:form>
	</div>
	
</div>